package vehicle_maintain_enum

import "gitee.com/lailonghui/vehicle-supervision-framework/pkg/dicts"

// 车辆维护-维护下一步
type vehicleMaintainNextStep int

var VehicleMaintainNextStep vehicleMaintainNextStep

// 工程部接单
func (c *vehicleMaintainNextStep) EngineerReceive() int {
	return 1
}

// 工程部维护
func (c *vehicleMaintainNextStep) EngineerMaintain() int {
	return 2
}

// 等待校验
func (c *vehicleMaintainNextStep) WaitForVerify() int {
	return 3
}

// 客户回访
func (c *vehicleMaintainNextStep) CustomerReturnVisit() int {
	return 4
}

// 完成
func (c *vehicleMaintainNextStep) Finished() int {
	return 5
}

func (c *vehicleMaintainNextStep) ToText(value int) string {
	switch value {

	case 1:
		return "工程部接单"

	case 2:
		return "工程部维护"

	case 3:
		return "等待校验"

	case 4:
		return "客户回访"

	case 5:
		return "完成"

	}
	return ""
}

func (c *vehicleMaintainNextStep) ToDict(value int) *dicts.IntDict {
	return &dicts.IntDict{
		Text:  c.ToText(value),
		Value: value,
	}
}

func (c *vehicleMaintainNextStep) ToValue(text string) int {
	switch text {

	case "工程部接单":
		return 1

	case "工程部维护":
		return 2

	case "等待校验":
		return 3

	case "客户回访":
		return 4

	case "完成":
		return 5

	}
	return 0
}
